home *** CD-ROM | disk | FTP | other *** search
/ Inside Mac Games Volume 4 #7 / IMG 38 July 1996.iso / More Goodies / Update Files / Tetris Max 2.8 folder / Making Your Own Music < prev    next >
Text File  |  1996-05-07  |  5KB  |  27 lines

  1. INTRODUCTION
  2.  
  3. Creating your own music files for use with Tetris Max requires using ResEdit. If you're not familiar with ResEdit, it's a resource editor made by Apple. Resources are special pieces of data in an application or data file, like a sound or a picture. Using ResEdit, you can change these resources, thereby causing the program that uses the resources to exhibit new behavior. For instance, you might edit some of the graphics resources of Tetris Max to make all the pieces look like they're made out of miniature teddy bears. If you don't already have a copy, you should be able to find ResEdit from a local Macintosh user group, or if you have a connection to the internet, you can ftp it from ftp.apple.com. 
  4.  
  5. ResEdit is not for the faint of heart. It is possible to completely trash a file by screwing up its resources with ResEdit, so always work with a copy of the file, never the original. It's not the most friendly and intuitive program around, either. However, if you exercise common sense and work on a copy of the file instead of the original, you should be able to accomplish a great deal using ResEdit, and no one will get hurt. Attempting to explain how to use it is a huge task, so this document will assume you already know your way around ResEdit fairly well. If not, Apple publishes a book that describes the use of ResEdit thoroughly. Please do not send me email asking how to use ResEdit! I have already received more than a lifetime supply of such messages.
  6.  
  7. MAKING YOUR OWN MUSIC FILE
  8.  
  9. 1. Using ResEdit, create a new ResEdit document. Change its creator to "log3" and its type to "tMUS". You will add your music segments to this document as "snd " resources. 
  10.  
  11. 2. Digitize some music using your favorite digitizer. With a program such as SoundEditPro or Sample Editor, break the music up into segments of a few seconds each. The general idea is that if there are themes or refrains in the music which repeat, you need only make a single segment for each, and Tetris Max will play the segments more than once as appropriate. When you're done, you should be able to play the whole song by stringing segments together, perhaps repeating some segments. Add the segments as "snd " resources to the file created in step 1, giving them whatever names you wish. Each segment must have a unique name.
  12.  
  13. For example, if my song had the logical structure ABACAB, I would cut segments out of the full-length song corresponding to sections A,B, and C. I would then add three "snd " resources to my ResEdit document, and name them A, B, and C.
  14.  
  15. 3. For Tetris Max to play your music, you need to tell it in what order your segments should be played. Essentially, you just list the order, so for the example above I would give Tetris Max the order "A,B,A,C,A,B." (The exact manner in which you specify the ordering is described below.) When it reaches the end of the order you've specified, Tetris Max starts over at the beginning, so I would end up with music playing ABACABABACABABACAB... 
  16.  
  17. You can also make Tetris Max loop back to someplace other than the beginning of the ordering after it reaches the end. This is useful if your music has some kind of "intro" to it that you only want to play on the first pass through, but not on the loop-backs. Simply rename the sound segment that you want Tetris Max to loop back to "repeat". So if what I really wanted was ABBCBBCBBC..., I would rename the sound segment "B" "repeat". Then I would give Tetris Max the order "A,repeat,repeat,C". (If the repeat sound appears more than once in the order, it must be called "repeat" at every occurence. Thus "A,repeat,repeat,C" is acceptable, but "A,repeat,B,C" is not.)
  18.  
  19. The exact ordering of the segments is specified in a STR# resource. Create a new STR# resource in your music file with ID 128. The name of the first segment in the order goes at index 1, the second at index 2, and so on. So for the example above, I would put "A" at index 1, "repeat" at index 2, "repeat" at index 3, and "C" at index 4.
  20.  
  21. 4. You should also put a description of your music, with information such as the title, author, etc, in STR# resource ID 129, index 1. This string will be displayed whenever the user selects the "about music" option from the apple menu. Here's your chance for fame!
  22.  
  23. Some things to watch out for:
  24. • You may need to increase the memory allocated to Tetris Max (using the Finder's "Get Info" box) in order to use large music files. As a rule of thumb, you should set the preferred memory size to about 650k plus the size of the music file.
  25. • The snd resources must all be format 1 resources. For most people this is the default anyway, so you shouldn't need to worry about this.
  26. • If the snd resources are marked "purgeable", you may be able to get away with allocating less memory to Tetris Max. The program will attempt to dynamically load and purge the sounds as they are needed. However, marking the resouces "purgeable" can result in audible delays between music segments as the next segment is loaded from disk. 
  27.